package com.thoughtorigin.flux.asflux {
public class ObjectDef {

    private var _clazz: Class;
    private var _properties: Array;
    private var _constructorArgs: Array;
    private var _executions: Array;
    private var _createNew: Boolean;

    public function ObjectDef(clazz: Class, createNew: Boolean = false) {
        _clazz = clazz;
        _properties = [];
        _constructorArgs = [];
        _executions = [];
        _createNew = createNew;
    }

    public function getClass(): Class {
        return _clazz;
    }

    public function addProperty(property: Property): ObjectDef {
        _properties.push(property);
        return this;
    }

    public function addConstructorArg(arg: Argument): ObjectDef {
        _constructorArgs.push(arg);
        return this;
    }

    public function addExecution(execution: Execution): ObjectDef {
        _executions.push(execution);
        return this;
    }

    public function get properties(): Array {
        return _properties;
    }

    public function get constructorArgs(): Array {
        return _constructorArgs;
    }

    public function get executions(): Array {
        return _executions;
    }

    public function get createNew(): Boolean {
        return _createNew;
    }
}
}